Previously, we would not look any further for
an action once we found a match for the prefix,
defining inheritance by groups. Change this to
inheritance for individual actions, since we
are moving towards individual actions as the
main ingredient in GTKs action support.
{
const gchar *dot;
gchar *prefix;
+ const char *name;
Group *group;
dot = strchr (full_name, '.');
if (!dot)
return NULL;
+ name = dot + 1;
+
prefix = g_strndup (full_name, dot - full_name);
group = g_hash_table_lookup (muxer->groups, prefix);
g_free (prefix);
if (action_name)
- *action_name = dot + 1;
+ *action_name = name;
+
+ if (group &&
+ g_action_group_has_action (group->group, name))
+ return group;
- return group;
+ return NULL;
}
GActionGroup *
Group *group;
group = gtk_action_muxer_find_group (muxer, action_name, unprefixed_name);
+ if (group)
+ return group->group;
- return group->group;
+ return NULL;
}
void